﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace FileServer
{
    class ServerAPI
    {

        Connections connections;
        private Thread listener;

        public ServerAPI()
        {
            connections = new Connections("E1015P05", "D:\\got\\putty.exe");
        }

        public void stop()
        {
            connections.stop();
            System.Diagnostics.Debug.WriteLine("status of thread after stop: " + listener.ThreadState);
        }

        
        public void start()
        {
            listener = new Thread(new ThreadStart(connections.start));
            listener.Name = "Server Listener";
            listener.Start();
        }
    }
}
